package com.zhanglu.fun.services.website.forum.thread;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhanglu.fun.services.website.bean.request.ForumThreadRequest;
import com.zhanglu.fun.services.website.client.DataCenterClient;
import com.zhanglu.fun.services.website.common.ResultResponse;

/**
 * @description 
 * @Auther zhanglu
 * @Date 2017/8/21 下午3:18
 */
@Service
public class ThreadService {
    @Autowired
    private DataCenterClient dataCenterClient;

    public ResultResponse getForumThreads(ForumThreadRequest forumThread) {
        return dataCenterClient.getForumThreads(forumThread.getContent(), forumThread.getThreadGroup(), forumThread.getStatus());
    }

    public ResultResponse deleteForumThread(Long id) {
        return dataCenterClient.deleteForumThread(id);
    }

    public ResultResponse addForumThread(ForumThreadRequest forumThread) {
        return dataCenterClient.addForumThread(forumThread);
    }

    public ResultResponse updateForumThread(ForumThreadRequest forumThread) {
        return dataCenterClient.addForumThread(forumThread);
    }
}
